﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Sisocana.Core.Models.ImagenAsociadoModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Site Configuration
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="HeaderContent" runat="server">
    <%--para el menu para el menu--%>
    	
    <link href="<%: Url.Content("~/Content/tabbedContent.css") %>" rel="stylesheet" type="text/css" />
	<script src="<%: Url.Content("~/Scripts/tabbedContent.js") %>" type="text/javascript"></script>
    <script src="<%: Url.Content("~/Scripts/jquery-ui-1.8.11.js") %>" type="text/javascript"></script>
    <link href="<%: Url.Content("~/Content/themes/base/jquery.ui.all.css") %>" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
            $("p a, input:submit,input:file ").button();
        });
    </script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
<script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>" type="text/javascript"></script>
<link rel="stylesheet" media="screen" type="text/css" href="<%: Url.Content("~/Content/colorpicker/css/colorpicker.css") %>" />
<script type="text/javascript" src="<%: Url.Content("~/Content/colorpicker/js/colorpicker.js") %>"></script>
<script type="text/javascript">
    $(document).ready(function () {
    $('#BackgroundShellColor').ColorPicker({
	onSubmit: function(hsb, hex, rgb, el) {
		$(el).val('#'+ hex);
		$(el).ColorPickerHide();
	},
    onChange: function (hsb, hex, rgb, el) {
		$('#BackgroundShellColor').css('backgroundColor', '#' + hex);
        $('#BackgroundShellColor').css('color', '#' + hex);
        $('#BackgroundShellColor').val('#' + hex);
	},
	onBeforeShow: function () {
		$(this).ColorPickerSetColor(this.value);
	},

    }).bind('keyup', function(){
	    $(this).ColorPickerSetColor(this.value);
    });
    col = $('#BackgroundShellColor').val();
    $('#BackgroundShellColor').css('width', 40).css('color', col ).css('backgroundColor',col);

    });

</script>

<% Html.EnableClientValidation(); %>


<% using (Html.BeginForm()) { %>
    <%: Html.ValidationSummary(true) %>
    <h2>Site Configuration</h2>
    <fieldset>
    <% Html.RenderPartial("MenuEditSite", Model.idSitio); %>

        <%:Html.HiddenFor(model => model.idSitio) %>
        <%:Html.HiddenFor(model => model.id) %>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.ImagenAsociadoName) %>
        </div>
        <div class="editor-field">
            <% = Html.DropDownList("ImagenAsociadoName")%>         
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.photoGallery)%>
        </div>
        <div class="editor-field">
            <% = Html.DropDownList("photoGallery")%>         
        </div>
        
        <div class="editor-label">
            <%: Html.LabelFor(model => model.tagBusqueda) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.tagBusqueda) %>
            <%: Html.ValidationMessageFor(model => model.tagBusqueda) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.apiKey) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.apiKey) %>
            <%: Html.ValidationMessageFor(model => model.apiKey) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.appSecret) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.appSecret) %>
            <%: Html.ValidationMessageFor(model => model.appSecret) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.cantVisualizar) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.cantVisualizar) %>
            <%: Html.ValidationMessageFor(model => model.cantVisualizar) %>
        </div>
        </fieldset>
        <fieldset>
        <legend>Visual Customization</legend>   
            <div class="editor-label">
                <%: Html.LabelFor(model => model.width,"Width")%>
            </div>
            <div class="editor-field">
                <%: Html.EditorFor(model => model.width) %> px
                <%: Html.ValidationMessageFor(model => model.width)%> 
            </div>

            <div class="editor-label">
                <%: Html.LabelFor(model => model.heigth,"Heigth")%>
            </div>
            <div class="editor-field">
                <%: Html.EditorFor(model => model.heigth)%> px
                <%: Html.ValidationMessageFor(model => model.heigth)%>
            </div>
            <div class="editor-label">
                <%: Html.LabelFor(model => model.BackgroundShellColor) %>
            </div>
            <div class="editor-field">
                <%: Html.EditorFor(model => model.BackgroundShellColor)%>
                <%: Html.ValidationMessageFor(model => model.BackgroundShellColor)%>
            </div>
    </fieldset>
        <p>
            <% if (Model.tagBusqueda == null || Model.tagBusqueda.Equals(""))
               {%>
                    <input type="submit" value="Create" />
             <%}
               else
               {%>
                <input type="submit" value="Update" />
            <% } %>
        </p>

<% } %>

<div>
    <%: Html.ActionLink("Back to List", "Index") %><br />
    (or perhaps you want to <%: Html.ActionLink("load a bunch of images", "UploadImages", new { id = Model.idSitio })%>)
</div>

</asp:Content>

